import { ActionReducerMap, ActionReducer, MetaReducer } from '@ngrx/store';
import * as userReducer from './user/user.reducer';
import * as utilsReducer from './utils/utils.reducer';
import { environment } from '../../environments/environment';
import { AppState } from './app.model';
export const reducers: ActionReducerMap<AppState> = {
    user: userReducer.userReducer,
    utils:utilsReducer.utilsReducer,
};
export function logger(reducer: ActionReducer<AppState>): ActionReducer<AppState> {
    return function (state: AppState, action: any): AppState {
        console.log('状态是state', state);
        console.log('动作是action', action);
        return reducer(state, action);
    };
}
export const metaReducers: MetaReducer<AppState>[] = !environment.production
    ? [logger]
    : [];
